﻿package com.tudou.track
{
    import com.tudou.config.*;
    import com.tudou.fast.*;
    import flash.net.*;

    public class ErrorTracker extends Object
    {
        public static const VIDEO_ERROR:int = 4;
        public static const ADCONTROL_SECURITY_ERROR:int = 7;
        public static const ADPLAY_SECURITY_ERROR:int = 9;
        public static const AD_V2_TIMEOUT:int = 14;
        public static const CAN_NOT_PLAY_V2_ERROR:int = 2;
        public static const AD_VIDEO_TIMEOUT:int = 13;
        public static const ADPLAY_IOERROR:int = 10;
        public static const V2_IOERROR:int = 2;
        public static const STREAM_BREAK:int = 5;
        public static const CAN_NOT_PLAY_NO_URL:int = 4;
        public static const CAN_NOT_PLAY_PARSE_XML_ERROR:int = 3;
        public static const CAN_NOT_PLAY_USE_UP_ALL_URLS:int = 5;
        public static const V2_CACHE_ERROR:int = 3;
        public static const V2_SECURITY_ERROR:int = 1;
        public static const CAN_NOT_PLAY:int = 6;
        public static const ADCONTROL_PARSE_XML_ERROR:int = 11;
        public static const AD_VIDEO_ERROR:int = 12;
        public static const CAN_NOT_PLAY_V2_CROSSDOMAIN_ERROR:int = 1;
        public static const ADCONTROL_IOERROR:int = 8;

        public function ErrorTracker()
        {
            return;
        }// end function

        public static function send(param1:String, param2:int, param3:int = 0, param4:String = "", param5:String = "") : void
        {
            var _loc_6:* = Config.ERROR_URL;
            _loc_6 = Config.ERROR_URL + ("?type1=" + param2);
            _loc_6 = _loc_6 + ("&type2=" + param3);
            _loc_6 = _loc_6 + ("&sid=" + param1);
            var _loc_7:* = new URLRequest(_loc_6);
            var _loc_8:* = new URLVariables();
            new URLVariables().str1 = param4;
            _loc_8.str2 = param5;
            _loc_8.fs = FastTudouNew.inst.version;
            _loc_7.method = URLRequestMethod.POST;
            _loc_7.data = _loc_8;
            sendToURL(_loc_7);
            return;
        }// end function

    }
}
